package com.qf.smsplatfrom.pojo;


import org.springframework.util.ObjectUtils;

public class TMenu implements CheckNull {

  private Long id;
  private String name;
  private Long parentId;
  private String url;
  private String icon;
  private String perms;
  private Long type;
  private Long sort;
  private Long state;
  private TRoleMenu tRoleMenu;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getParentId() {
    return parentId;
  }

  public void setParentId(Long parentId) {
    this.parentId = parentId;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getIcon() {
    return icon;
  }

  public void setIcon(String icon) {
    this.icon = icon;
  }

  public String getPerms() {
    return perms;
  }

  public void setPerms(String perms) {
    this.perms = perms;
  }

  public Long getType() {
    return type;
  }

  public void setType(Long type) {
    this.type = type;
  }

  public Long getSort() {
    return sort;
  }

  public void setSort(Long sort) {
    this.sort = sort;
  }

  public Long getState() {
    return state;
  }

  public void setState(Long state) {
    this.state = state;
  }

  public TRoleMenu gettRoleMenu() {
    return tRoleMenu;
  }

  public void settRoleMenu(TRoleMenu tRoleMenu) {
    this.tRoleMenu = tRoleMenu;
  }

  @Override
  public boolean isNull(CheckType type) {
    switch (type) {
      case UPDATE:
        return ObjectUtils.isEmpty(state)||ObjectUtils.isEmpty(name);
    }
    return CheckNull.super.isNull(type);
  }
}
